# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=index
pkgver=4.0.0
pkgrel=1
pkgdesc="Index file manager based on MauiKit"
# armhf blocked by qt5-qtdeclarative
# s390x, x86, ppc64le, riscv64, loongarch64 blocked by mauikit-imagetools
arch="all !armhf !s390x !x86 !ppc64le !riscv64 !loongarch64"
url="https://invent.kde.org/maui/index-fm"
license="GPL-2.0-or-later"
depends="
	mauikit-archiver
	mauikit-imagetools
	"
makedepends="
	extra-cmake-modules
	ki18n-dev
	kio-dev
	knotifications-dev
	kservice-dev
	mauikit-dev
	mauikit-filebrowsing-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/index-fm.git"
source="https://download.kde.org/stable/maui/index/$pkgver/index-fm-$pkgver.tar.xz"
options="!check" # No tests available
builddir="$srcdir/$pkgname-fm-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
f4f5001620752272104ab23a53bd7a4e5ff5ca8582521e4e7f6951b0bbc9b03d93e1595de82804aaa4870362cc7747a0ef0ad5710f35d05a611e0775745ddae0  index-fm-4.0.0.tar.xz
"
